<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>




<table id="tree" ></table> <div id="navigator"></div>
<br>
<script type="text/javascript" language="javascript">   
<!--

	
	$(document).ready(function(){
    jQuery("#tree").jqGrid({
        treeGrid: true,
        treeGridModel: 'adjacency',
        ExpandColumn: 'dictionaryName',
        ExpandColClick: true,
        mtype: "POST",
        //url:'test.xml',
        url: 'dictionary/list', 
        jsonReader:{ root: "dataRows"}, 
        datatype: 'json',
        colNames: ["dictionaryId",
				
				"名称",
				"编码", 
				"描述"],
        colModel: [{name:'dictionaryId',index:'dictionaryId', width:1,hidden:true,key:true, editable:false},
				{name:'dictionaryName',index:'dictionaryName', width:80, align:"left",editable:true}, 
				{name:'code',index:'code', width:80, align:"right",editable:true}, 
				{name:'description',index:'description', width:80,align:"right",editable:true,sortable:false,edittype:'textarea'} ],
		pager : "#navigator",
        height:'auto',
        editurl:'dictionary/update'
        ,
         imgpath: 'js/theme/images/jqgrid',
        width:$(document).width()-80,
        caption: '基础数据树',

    });
    $("#tree").jqGrid('navGrid',
    					"#navigator",
    					{search:false},
    					{closeAfterEdit:true},
    					{closeAfterAdd:true});
});

	
	
	
 -->
</script>